<?php
namespace support;

use Webman\Config as EasyConfig;

class Config extends EasyConfig
{

    /**
     * 初始化配置
     * @param array $pathArray
     * @param array $excludeFiles
     * @return bool
     */
    public static function init(array $pathArray , array $excludeFiles = [] )
    {
        if(empty($pathArray)){
            return true;
        }
        foreach ($pathArray as $key => $item){
            parent::load($item , $excludeFiles[$key] ?? [] , $key );
        }
        return true;
    }

    /**
     * 重新加载配置
     * @param array $pathArray
     * @param array $excludeFiles
     */
    public static function reInit(array $pathArray , array $excludeFiles = [] )
    {
        parent::$_config = [];
        self::init($pathArray , $excludeFiles);
    }




}